package testPage;

import common.User;
import common.Writings;
import org.junit.jupiter.api.Test;
import page.DoPostPage;

import static org.junit.jupiter.api.Assertions.*;

class DoPostPageTest {

    DoPostPage doPostPage = new DoPostPage();

    @Test
    void openDoPost() throws InterruptedException {
        User user = new User("user","123zz");
        doPostPage.openDoPost(user);
        doPostPage.close();
    }

    @Test
    void publishPost() throws InterruptedException {
        User user = new User("user","123zz");
        Writings writings = new Writings("mysql创建数据库","创建MySQL数据库的主要步骤：1. 打开MySQL命令行客户端 2. 创建数据库 3. 选择数据库 4. 创建表 5. 插入数据6. 查看数据库7. 查看表");
        doPostPage.publishPost(writings,user);
        doPostPage.close();

    }
}